package com.aisino.entity;

import com.aisino.annotation.DocId;
import com.aisino.annotation.EsClass;
import com.aisino.annotation.EsField;
import com.aisino.esenum.EsDataType;
import lombok.Data;

// 只能使用包装类型 ,不能使用基础类型 ,否则会导致一些高级特性有问题
@EsClass
@Data
public class UserEsEntity {

    @DocId
    private  Long id;
    @EsField(type = EsDataType.KEYWORD   )
    private  String name;
    @EsField(type =EsDataType.INTEGER)
    private  Integer age;
    @EsField(type = EsDataType.TEXT,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    private  String dec;
    @EsField(type =EsDataType.KEYWORD)
    private  String sku;
    @EsField(type =EsDataType.DOUBLE)
    private  Double price;
}

